package com.frame.work.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frame.work.entity.GatewayLogMessageDO;
import com.frame.work.entity.TblGateway;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * @author wjming
 */
public interface TblGatewayMapper extends BaseMapper<TblGateway> {
    /**
     * 通过网关查询网关和家庭的信息
     *
     * @param gatewayMac
     * @return
     */
    Map<String, Object> seleGatewayAndHomeMessage(@Param("gatewayMac") String gatewayMac);


    /**
     * 通过网关mac获取用户信息
     *
     * @param gatewayMac
     * @return
     */
    String getUserIdByGatewayMac(@Param("gatewayMac") String gatewayMac);

    /**
     * 通过网关查询设备的信息
     *
     * @param gatewayMac
     * @return
     */
    GatewayLogMessageDO getUserMessageByGatewayMac(@Param("gatewayMac") String gatewayMac);
}